package org.huangrui.design.pattern.proxy.dynamic;

public class DynamicProxyDemo {
    public static void main(String[] args) {
        RealAdminServiceOne one = new RealAdminServiceOne();//被代理类对象
        AdminServiceOne proxyOne = DynamicProxyTemplate.createProxy(one);//代理类对象
        proxyOne.adminOperationOne();

        System.out.println("========================");
        RealAdminServiceTwo two = new RealAdminServiceTwo();//被代理类对象
        AdminServiceTwo proxyTwo = DynamicProxyTemplate.createProxy(two);//代理类对象
        proxyTwo.adminOperationTwo();
    }
}
